package com.after.saas.client.service.factory;

import com.after.saas.common.utils.ResponseUtil;
import com.after.saas.client.service.LogClient;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Classname AuthHistrixFactory
 * @Description TODO
 * @Date 2021/6/3 14:52
 * @Created by hjchen
 */

@Component
public class LogHystrixFactory implements FallbackFactory<LogClient> {

    @Override
    public LogClient create(Throwable throwable) {
        return logVO -> ResponseUtil.FAILURE(throwable.getMessage());
    }
}